<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>css居中</title>
    <style type="text/css">
    *{
    	margin: 0;
    	padding: 0;
    }
    /* body{
        display: flex;
    }
    .right{
        width: 200px;
        height: 200px;
        background:red;
    }
    .left{
        flex: 1;
        height:100px;
        background: pink;
    } */

    div{
        height: 200px;
    }
    .left {
        float: right;
        width: 200px;
        background-color: rebeccapurple;
    }
    .right {
        width: 100%;
        margin-right: 200px;
        background-color: red;
    }
    </style>
</head>
<body>

    <div class='left'>left</div>
    <div class='right'>right</div>

    <svg>
        <circle cx="100" cy="50" r="40" stroke="black"
        stroke-width="2" fill="red" />
      </svg>

</body>

<script>

    // var str='aagsdaaaccccvasd';
    // let i=0;
    // let l=str.length;
    // let k=1;
    // let obj={}

    // for( ;i<l;i++){
    //     var vl=str[i];
    //     if(obj[vl]&&obj[vl].value==vl){
    //         obj[vl].count++;
    //     }else{
    //         obj[vl]={};
    //         obj[vl].count=1;
    //         obj[vl].value=vl;
    //     }
    // }

    // console.log(obj)
    /*
    class Bar{
        constructor(name){
            this.name = 'kkk'
        }

        alertName(){
            alert(this.name)
        }
    }

    Object.assign(Bar.prototype,{
        fun1(){
            console.log('fun1')
        },
        fun2(){
            console.log('fun2')
        },
    })

    const bar =new Bar()

    console.log(Object.keys(Bar.prototype))
    console.log(Object.getOwnPropertyNames(Bar.prototype))
    */
    
    // setTimeout(function () {
    //     console.log(1);
    // });
    // new Promise(function(resolve,reject){
    //     console.log(2)
    //     resolve(3)
    // }).then(function(val){
    //     console.log(val);
    // })
    // console.log(4);



</script>

</html>